<template>
  <div class="order-list-view view-container">
    <div class="main-content">
      <div class="list-container">

        <div style="display: flex;align-items: flex-start;justify-content: space-between">

          <el-tabs
            v-model="activeName"
            style="width:100%"
            @tab-click="handleClick"
          >
            <el-tab-pane
              label="订单列表"
              name="orderList"
            />
            <el-tab-pane
              label="发货明细"
              name="goodsList"
            />
          </el-tabs>

        </div>

        <component :is="activeName" ref="refComponent" />

      </div>
    </div>

  </div>
</template>

<script>
import {defineAsyncComponent, defineComponent, reactive, toRefs} from 'vue'

export default defineComponent({
  name: 'Index',
  components: {
    goodsList: defineAsyncComponent(() =>
            import('./modules/goodsList.vue')
    ),
    orderList : defineAsyncComponent(() =>
            import('./modules/orderList.vue')
    ),
  },
  setup() {
    var data = reactive({
      activeName: 'orderList',
    })

    return {
      ...toRefs(data),
    }
  }
})
</script>

<style scoped>

</style>
